import Vue from 'vue'
import Vuex from 'vuex'
import tabBar from './modules/tab_bar'

//挂载Vuex
Vue.use(Vuex)

//创建VueX对象
const store = new Vuex.Store({
  state: {
    auth: {},
    admin: {}
  },
  mutations: {
    auth(state, auth) {
      state.auth = auth
    },
    admin(state, admin) {
      state.admin = admin
    }
  },
  modules: {
    tabBar
  }
})

export default store
